﻿CREATE TABLE [dbo].[Permiso] (
    [Id]           INT          IDENTITY (1, 1) NOT NULL,
    [AplicacionId] INT          NOT NULL,
    [Nombre]       VARCHAR (50) NOT NULL,
    [Tipo]         CHAR (1)     NOT NULL,
    [Padre]        INT          NULL,
    CONSTRAINT [PK_Permiso] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Permiso_Aplicacion] FOREIGN KEY ([AplicacionId]) REFERENCES [dbo].[Aplicacion] ([Id])
);

